Ext.define('Admin.view.user.info.UserInfoCoverForm', {
    extend: 'Ext.form.Panel',
    alias: 'widget.userInfoCoverForm',
    xtype: 'userInfoCoverForm',

    requires: [
        'Ext.form.field.Text',
        'Ext.form.field.File',
        'Ext.button.Button'
    ],

    controller: 'userInfoViewController',

    layout: {
        type: 'hbox',
        align: 'stretch'
    },

    items: [{
        xtype: 'filefield',
        labelWidth: 80,
        width: 350,
        name: 'cover',
        emptyText: '选择 .jpg/.png 的图片!',
        allowBlank: false,
        fieldLabel: '上传头像:',
        labelSeparator: '',
        buttonConfig: {
            xtype: 'filebutton',
            glyph: '',
            iconCls: 'x-fa fa-cloud-upload',
            text: '选择图片'
        }
    }],

    buttons: ['->', {
        text: '取消',
        listeners: {
            click: 'onCoverFormCancelButton'
        }
    }, {
        text: '上传',
        ui: 'soft-green',
        formBind: true,
        listeners: {
            click: 'onCoverFormSubmitButton'
        }
    }]

});